home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 140
/
(Vol 140) Sep 19 2011.iso
/
Games
/
theLifeArk.swf
/
scripts
/
DefineSprite_53_levelList
/
frame_1
/
DoAction.as
Wrap
Text File
|
2011-09-19
|
873b
|
35 lines
_global.gameDat = SharedObject.getLocal("pirateRace","/");
if(!_global.gameDat.data.levelNum)
{
_global.gameDat.data.levelNum = 1;
_global.gameDat.flush();
}
i = 1;
while(i <= 12)
{
if(i <= _global.gameDat.data.levelNum)
{
this["btn" + i].gotoAndStop("ok");
this["btn" + i].onPress = function()
{
_global.ctn.game.crtLevel = Number(this._name.substr(3,2));
_global.ctn.game.loadLevel();
_global.ctn.game.levelList.removeMovieClip();
};
this["btn" + i].useHandCursor = true;
}
else
{
this["btn" + i].gotoAndStop("no");
this["btn" + i].onPress = null;
this["btn" + i].useHandCursor = false;
}
this["btn" + i].ctt.gotoAndStop(i);
this["btn" + i].num.text = "LEVEL: " + i;
i++;
}
bg.onPress = function()
{
};
bg.useHandCursor = false;